package cn.edu.tju.postfix;

public class Stack {
	
	//private int maxSize;
	private int top;
	private char[] stack;
	
	public Stack(int maxSize){
		//this.maxSize = maxSize;
		this.stack = new char[maxSize];
		this.top = -1;
	}
	
	public void push(char c){
		stack[++top] = c;
	}
	
	public char pop(){
		return stack[top--];
	}
	
	public boolean isEmpty(){
		return top == -1;
	}
	
	public char getTop(){
		return stack[top];
	}

}
